package com.fuint.common.config;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * OpenAPI接口文档配置
 *
 * Created by FSQ
 * CopyRight https://www.fuint.cn
 */
@Configuration
public class SwaggerConfig implements WebMvcConfigurer {

     @Bean
     public OpenAPI customOpenAPI() {
         return new OpenAPI()
                 .info(new Info()
                         .title("fuint会员营销系统接口文档")
                         .description("fuint会员营销系统接口文档，\"/clientApi\"目录接口为会员端相关接口，\"/backendApi\"目录接口为后台管理端相关接口。")
                         .version("1.0")
                         .termsOfService("https://www.fuint.cn/")
                         .contact(new Contact()
                                 .name("海南延禾信息技术有限公司")
                                 .url("https://www.fuint.cn/")
                                 .email("fushengqian@qq.com")));
     }
}
